package cn.micai.shiro.chapter11.dao;

import cn.micai.shiro.chapter11.entity.User;

import java.util.Set;

/**
 * @author zhaoxinguo on 2017/8/16.
 */
public interface UserDao {

    public User createUser(User user);

    public void updateUser(User user);

    public void deleteUser(Long userId);

    public void correlationRoles(Long userId, Long... roleIds);

    public void uncorrelationRoles(Long userId, Long... roleIds);

    User findOne(Long userId);

    User findByUsername(String username);

    Set<String> findRoles(String username);

    Set<String> findPermissions(String username);

}
